package com.fowo.api.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fowo.api.common.model.OptionItem;
import com.fowo.api.controller.purchase.dto.DevelopmentTaskItemDTO;
import com.fowo.api.controller.purchase.vo.*;
import com.fowo.api.entity.AmazonOrderListProductDetail;
import com.fowo.api.entity.ShipPlansSub;
import com.fowo.api.entity.WarehouseBin;
import com.fowo.api.entity.WarehouseBinProducts;
import com.fowo.api.model.warehouse.bin.WarehouseBinItemVo;
import com.fowo.api.model.warehouse.bin.WarehouseBinSearchParamPo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Set;

@Mapper
public interface WarehouseBinDMapper extends BaseMapper<WarehouseBin> {
    Page<WarehouseBinItemDVo> pageSearch(
            @Param("page") Page page,
            @Param("search") WarehouseBinParam search
    );
    ShipPlansSub getShipPlansSubs(Long wid, Long shopId, String fnsku,String sku);
  List<WarehouseBinItemDVo>getWareBinUseTypeCount2(@Param("search") WarehouseBinParam search);
    Page<WarehouseBinreportFormsDVo> reportForms(
            @Param("page") Page page,
            @Param("search") WarehouseBinParam search
    );

 List<PurchaseOrderProductItem> getPurchaseOrderProduct(String startDate, String endDate);
 List<PurchaseOrderProductItem> getPurchaseOrderProduct2(String startDate, String endDate);


//WareReportForms
Page<WareReportFormsDvo> WareReportForms(
        @Param("page") Page page,
        @Param("search") WarehouseBinParam search
);

List<warehouseBin> getWareBin(
            @Param("search") WarehouseBinParam search
    );
    List<warehouseBin> getWareBin3(
            @Param("search") WarehouseBinParam search
    );
    List<warehouseBin> getWareBin2(
            @Param("search") WarehouseBinParam search
    );
   List<warehouseBinInventory> getWareBinOne(
            @Param("search") WarehouseBinParam search
    );
    AmazonOrderListProductDetail getAmazonOrderQty(
            @Param("search") WarehouseBinParam search
    );

    List<WarehouseBinStockVo> selectBinByWarehouse(@Param("search") WarehouseBinParam search);

    Page<WarehouseBinStockVo> selectBinByWarehousePage(@Param("page") Page page,
                                                       @Param("search") WarehouseBinParam search);

    List<WarehouseBinProducts> getWareBinProductsList(
            @Param("search") Set<Long> ids
    );

    List<WarehouseBinProducts> getWareBinProducts(
            @Param("search") WarehouseBinProducts search
    );

    List<DevelopmentTaskItemDTO> DevelopmentTaskItem(Long userId);

    Page<WarehouseBin> selectStockInBinPage(@Param("page") Page page,
                                                   @Param("search") WarehouseBinParam search);

    List<OptionItem<WarehouseBinItemVo>> searchOptions(@Param("search") WarehouseBinParam search);
}
